<%@page import="java.util.Vector"%>
<%@page import="uy.com.asse.business.auth.LDAPAuthentication"%>
<%@page import="javax.naming.NamingException"%>

<%
    response.setHeader("Cache-Control","no-store");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
   
   
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
   
    <body>
   
    <% String fname=null,fpassword=null;
    try
    {
    session.setAttribute("name",null);
    session.setAttribute("password",null);
    fname=request.getParameter("name");
    fpassword=request.getParameter("password");
   // if(fname.equals("admin")&&fpassword.equals("admin"))
   
   // LDAPAuthentication l =new LDAPAuthentication();
    
    //Vector<String> v=l.authenticateUser(fname, fpassword); 
    
   //  if(l.authenticateUser(fname, fpassword).size()>0)
   // {
          if(true==true)
    {
     session.setAttribute("name",fname);
     session.setAttribute("password",fpassword);
    %>
    <jsp:forward page="Form_BusquedaPadronASSE.jsp"/>
    <%
    }
    else{%> 
    <jsp:forward page="index.jsp"/><%
     }
    }/* catch(javax.naming.AuthenticationException AuthEx){
     out.print("error de autenticacion: "+AuthEx.getMessage());
    }   
    
    catch(NamingException ex){
     out.print("NamingException "+ex.getExplanation());
    }*/
    catch(Exception e)
    {
     out.print("error de autenticacion inesperado");
    }   
    
    %>
    </body>
    </html>